import java.util.Arrays;
import java.util.Scanner;
public class t9 {
    public static void main(String[] agrs){
        //121 输出true ：-121 输出fales 10输出fales....
        Scanner scan = new Scanner(System.in);
        System.out.println("输入值");
        int num = scan.nextInt();

        if(num<0){
            System.out.println("false");
        }
        if(num>0){
            int a = 1;
            int b =num;
            for(int i =0; true; i++){
                if(num/10!=0){
                    num = num/10;
                    a++;
                }else {
                    break;
                }
            }
            System.out.println(a);


            int arr [] = new int[a];

            double c = 0.1;
            for(int i =0;i<=a-1;i++){
                int d =0;
                c *=10;
                d =(int)c;
                
                arr[i] = b/d%10;
               // System.out.println(d);
            }
            System.out.println(Arrays.toString(arr));
            int numes = 0;
            for(int i =0 ; i<(arr.length)/2;i++){

                if(arr[i] == arr[arr.length-1-i]){
                    numes++;
                }
            }
            if(numes == arr.length/2){
                System.out.println("true");
            }else{
                System.out.println("fales");
            }














        }

    }

}
